package Cmd;

import Spooler.*;

public class PrintCmd{
	Spooler mySpooler;
	
	public PrintCmd(Spooler spooler){
		this.mySpooler = spooler;
	}
	
	public int logIn(String serverIP, String id, String pw)
	{
		System.out.println("PrintCmd>login>id,pw:"+id+","+pw);
		int ans = mySpooler.logIn(serverIP, id, pw);
		System.out.println("PrintCmd>login>ans:"+ans);
		return ans;
	}
	
	public boolean isFileExist(){
		return this.mySpooler.isFileExist();
	}

	public void initCurFile(){
		mySpooler.initCurFile();
	}
	
	public void selectFile(String fileName, String filePath){
		mySpooler.selectFile(fileName, filePath);
	}
	
	public Task createTask(String userName, String prtOption, String prtName){
		return mySpooler.createTask(userName, prtOption, prtName);
	}
	
	public boolean printTask(int selectedRow) {
		return mySpooler.printTask(selectedRow);
	}
	
	public String getPrtOptionByName(String prtName){
		return mySpooler.getPrtOptionByName(prtName);
	}
	
	public String getUserInfo(){
		return mySpooler.getUserInfo();
	}
	
	public String getCurDocInfo(){
		return mySpooler.getCurDocInfo();
	}
}
